<template>
  <div>
    <img :src="imgs.headbg" style="width: 100%">
    <div style = "position: absolute;top: 20px;left:20px;color: white;font-weight: bold;font-size: 24px;">{{prjName}}</div>
    <div style = "position: absolute;top: 10px;left:550px;display: flex;flex-direction: row">
      <div v-for="(item,index) in menus" :key="index" style="margin-top: 20px;margin-left: 120px;font-size: 18px;font-weight: bold;cursor:pointer" :class="{'normal':select!=item.id,'active':select==item.id}"
      @click="menuSelect(item)">
        {{item.name}}
      </div>
    </div>
    <div style = "position: absolute;top: 20px;right:20px;color: white;font-weight: bold;font-size: 18px;" @click="goback">返回</div>
  </div>
</template>

<script>
import headbg from "../../static/image/headbg.png";
export default {
  props:["prj","prjName"],
  data () {
    return {
      imgs:{headbg},
      title:"岩石隧道工程信息模型结构数据标准",
      menus:[
        {id:"sub_standard_raw",name:"标准原文"},
        {id:"sub_standard",name:"数据模板"},
        {id:"sub_dataview",name:"数据查看"},
        {id:"sub_modelview",name:"数据可视化"},
      ],
      select:"sub_standard"
    }
  },
  created() {
  },
  mounted() {
  },
  methods:{
    menuSelect(item){
      this.select = item.id;
      console.log("select menu",this.select);
      this.$emit("menuSelect",this.select);
    },
    goback(){
      this.$router.push({ path: "../standardList"}); //管理员
    }
  }
}
</script>
<style>
.normal{
  color: white;
}
.active{
  color:orange;
}
</style>

